//轮播图
$(function(){
	var timer = null;
	var currindex = 0;
//无缝轮播函数
	function transmit(){                
		currindex++;
		if(currindex > 5){
			currindex = 0
		}
		$(".banner_pic").animate({"margin-left":"-1440px"},1000,function(){
			$(".banner_pic li").eq(0).appendTo($(".banner_pic"));
			$(".banner_pic").css({"margin-left":"0"});
		})
		$("._slide li").eq(currindex).css("background","url(img/slide_dot.png)no-repeat 0 0").siblings().css("background","url(img/slide_dot.png)no-repeat 0 -11px");
	}
//定时器控制轮播图间隔
	timer = setInterval(transmit,3000);       
 //点击左边按钮
	$("#banner ._next").click(function(){
		$("#banner .banner_pic").css("margin-left","-1440px");
		$("#banner .banner_pic li").eq(5).prependTo($("#banner .banner_pic"));
		$("#banner .banner_pic").animate({"margin-left":"0"},1000);
	}); 
 //点击右边按钮
	$("#banner ._prev").click(function(){           
		$("#banner .banner_pic").animate({"margin-left":"-1440px"},function(){
			$(".banner_pic li").eq(0).appendTo($(".banner_pic"));
			$(".banner_pic").css({"margin-left":"0"});
		})
	});
//移入小圆圈事件
	$("#banner a").hover(function(){                
		clearInterval(timer);
	},function(){
		timer = setInterval(transmit,3000);
	});
	$("._slide li").mouseover(function(){
		clearInterval(timer);
		$(this).css("background","url(img/slide_dot.png)no-repeat 0 0").siblings().css("background","url(img/slide_dot.png)no-repeat 0 -11px");
		//console.log($(this).index());
		$("#banner .banner_pic li").eq($(this).index()).prependTo($("#banner .banner_pic"));
		$("#banner .banner_pic").stop(true).animate({"margin-left":"0"},1000);
		timer = setInterval(transmit,3000);
	});
});



 //品牌旗舰    
$(function(){
//移入图片下面的div向上运动
	$("._brand ._hide").mouseover(function(){            
	$(this).stop(true).animate({"top":"200px"},100)
	})
	$("._brand ._hide").mouseout(function(){
		$(this).stop(true).animate({"top":"285px"},100)
	})
	
//边框效果
	$(".hot_icon").hover(function(){                        
		$(this).find("a").css("opacity",1).siblings("img").css("opacity",0);
		$(this).find(".topline").stop(true).animate({"width":"167px"},300);
		$(this).find(".bottomline").stop(true).animate({"width":"167px"},300);
		$(this).find(".leftline").stop(true).animate({"height":"85px"},300);
		$(this).find(".rightline").stop(true).animate({"height":"85px"},300);
		
	},function(){
		$(this).find("a").css("opacity",0).siblings("img").css("opacity",1);
		$(this).find(".topline").stop(true).animate({"width":"0"},300);
		$(this).find(".bottomline").stop(true).animate({"width":"0"},300);
		$(this).find(".leftline").stop(true).animate({"height":"0"},300);
		$(this).find(".rightline").stop(true).animate({"height":"0"},300);
	})
//点击按钮左右运动
	$(".hot_title .prev").click(function(){                 
		$(".hot_store ul").stop(true).animate({"margin-left":"-1210px"},1000,function(){
			$(".hot_store ul li").eq(0).appendTo($(".hot_store ul"));
			$(".hot_store ul").css("margin-left","0");
		});
	})
	$(".hot_title .next").click(function(){
		$(".hot_store ul").css("margin-left","-1210px");
		$(".hot_store ul li").eq(2).prependTo($(".hot_store ul"));
		$(".hot_store ul").animate({"margin-left":"0"},1000)
	})
});
//商场同款
$(function(){
//列表移入移出事件
	$("#hot_sale .brand_list li").eq(0).css("background","#000");
	$("#hot_sale .brand_list li").mouseover(function(){
		$(this).css("background","#000").siblings().css("background","#888");
		var _index = $(this).index();
		console.log($(this).index())
		$("#hot_sale .brand_list").animate({"left":"-(_index)*1210px"},1000)
	});
//商品的移出移出事件
	$(".goods_type dl").hover(function(){
		$(this).find("dd").stop(true).animate({"margin-left":"-30px"},300);
		$(this).find("img").stop(true).animate({"margin-left":"30px"},300);
	},function(){
		$(this).find("dd").stop(true).animate({"margin-left":"0"},300);
		$(this).find("img").stop(true).animate({"margin-left":"0"},300);
	})
})
//购物中心
$(function(){
//列表移入向上运动
	$(".shop_list li").hover(function(){
		$(this).find(".down").stop(true).animate({"top":"0"},300);
		$(this).find(".up").find("div").stop(true).animate({"margin-top":"-50px"},300);
	},function(){
		$(".shop_list .down").stop(true).animate({"top":"50px"},300);
		$(".shop_list .up div").stop(true).animate({"margin-top":"0"},300);
	});
//点击按钮实现轮播效果
	$(".bags_icon .meinu a").eq(1).css("background","#A85F1E");
//点击右边按钮
	var currindex = 0;
	$(".bags_icon .last a").click(function(){
		currindex++;
		if(currindex > 2){
			currindex = 0;
		}
		$(".bags_icon .meinu .disk a").css("background","#555");
		$(".bags_icon .meinu .disk a").eq(currindex).css("background","#A85F1E");
		$(".bags_icon ._icon").stop(true).animate({"margin-left":"-220px"},1000,function(){
			$(".bags_icon ._icon li").eq(0).appendTo(".bags_icon ._icon");
			$(".bags_icon ._icon").css("margin-left","0");
		});
	})
//点击左边按钮
	$(".bags_icon .first a").click(function(){
		currindex--;
		if(currindex < 0){
			currindex = 2;
		}
		$(".bags_icon .meinu .disk a").css("background","#555");
		$(".bags_icon .meinu .disk a").eq(currindex).css("background","#A85F1E");
		$(".bags_icon ._icon").css("margin-left","-220px");
		$(".bags_icon ._icon li").eq(2).prependTo(".bags_icon ._icon");
		$(".bags_icon ._icon").animate({"margin-left":"0"},1000);
	})
//鼠标点击小圆圈        典藏腕表 
	$(".watches_icon .meinu .disk a").click(function(){
		var _index = $(this).index();
		$(".watches_icon .meinu .disk a").css("background","#555");
		$(this).css("background","#A85F1E");
		$("_icon").animate({"margin-left":"-(_index*220)px"},1000);
	})
	//点击按钮实现轮播效果
	$(".watches_icon .meinu a").eq(1).css("background","#A85F1E");
//点击右边按钮
	var currindex = 0;
	$(".watches_icon .last a").click(function(){
		currindex++;
		if(currindex > 2){
			currindex = 0;
		}
		$(".watches_icon .meinu .disk a").css("background","#555");
		$(".watches_icon .meinu .disk a").eq(currindex).css("background","#A85F1E");
		$(".watches_icon ._icon").stop(true).animate({"margin-left":"-220px"},1000,function(){
			$(".watches_icon ._icon li").eq(0).appendTo(".watches_icon ._icon");
			$(".watches_icon ._icon").css("margin-left","0");
		});
	})
//点击左边按钮
	$(".watches_icon .first a").click(function(){
		currindex--;
		if(currindex < 0){
			currindex = 2;
		}
		$(".watches_icon .meinu .disk a").css("background","#555");
		$(".watches_icon .meinu .disk a").eq(currindex).css("background","#A85F1E");
		$(".watches_icon ._icon").css("margin-left","-220px");
		$(".watches_icon ._icon li").eq(2).prependTo(".watches_icon ._icon");
		$(".watches_icon ._icon").animate({"margin-left":"0"},1000);
	})
//鼠标点击小圆圈
	$(".watches_icon .meinu .disk a").click(function(){
		var _index = $(this).index();
		$(".watches_icon .meinu .disk a").css("background","#555");
		$(this).css("background","#A85F1E");
		$(".watches_icon _icon").animate({"margin-left":"-(_index*220)px"},1000);
	})
//精致配饰
	$(".accessories_icon .meinu .disk a").click(function(){
		var _index = $(this).index();
		$(".accessories_icon .meinu .disk a").css("background","#555");
		$(this).css("background","#A85F1E");
		$(".accessories_icon").animate({"margin-left":"-(_index*220)px"},1000);
	})
	//点击按钮实现轮播效果
	$(".accessories_icon .meinu a").eq(1).css("background","#A85F1E");
//点击右边按钮
	var currindex = 0;
	$(".accessories_icon .last a").click(function(){
		currindex++;
		if(currindex > 2){
			currindex = 0;
		}
		$(".accessories_icon .meinu .disk a").css("background","#555");
		$(".accessories_icon .meinu .disk a").eq(currindex).css("background","#A85F1E");
		$(".accessories_icon ._icon").stop(true).animate({"margin-left":"-220px"},1000,function(){
			$(".accessories_icon ._icon li").eq(0).appendTo(".accessories_icon ._icon");
			$(".accessories_icon ._icon").css("margin-left","0");
		});
	})
//点击左边按钮
	$(".accessories_icon .first a").click(function(){
		currindex--;
		if(currindex < 0){
			currindex = 2;
		}
		$(".accessories_icon .meinu .disk a").css("background","#555");
		$(".accessories_icon .meinu .disk a").eq(currindex).css("background","#A85F1E");
		$(".accessories_icon ._icon").css("margin-left","-220px");
		$(".accessories_icon ._icon li").eq(2).prependTo(".accessories_icon ._icon");
		$(".accessories_icon ._icon").animate({"margin-left":"0"},1000);
	})
//鼠标点击小圆圈
	$(".accessories_icon .meinu .disk a").click(function(){
		var _index = $(this).index();
		$(".accessories_icon .meinu .disk a").css("background","#555");
		$(this).css("background","#A85F1E");
		$(".accessories_icon ._icon").animate({"margin-left":"-(_index*220)px"},1000);
	})
//个户化妆
	$(".makeup_icon .meinu .disk a").click(function(){
		var _index = $(this).index();
		$(".makeup_icon .meinu .disk a").css("background","#555");
		$(this).css("background","#A85F1E");
		$(".makeup_icon").animate({"margin-left":"-(_index*220)px"},1000);
	})
	//点击按钮实现轮播效果
	$(".makeup_icon .meinu a").eq(1).css("background","#A85F1E");
//点击右边按钮
	var currindex = 0;
	$(".makeup_icon .last a").click(function(){
		currindex++;
		if(currindex > 2){
			currindex = 0;
		}
		$(".makeup_icon .meinu .disk a").css("background","#555");
		$(".makeup_icon .meinu .disk a").eq(currindex).css("background","#A85F1E");
		$(".makeup_icon ._icon").stop(true).animate({"margin-left":"-220px"},1000,function(){
			$(".makeup_icon ._icon li").eq(0).appendTo(".makeup_icon ._icon");
			$(".makeup_icon ._icon").css("margin-left","0");
		});
	})
//点击左边按钮
	$(".makeup_icon .first a").click(function(){
		currindex--;
		if(currindex < 0){
			currindex = 2;
		}
		$(".makeup_icon .meinu .disk a").css("background","#555");
		$(".makeup_icon .meinu .disk a").eq(currindex).css("background","#A85F1E");
		$(".makeup_icon ._icon").css("margin-left","-220px");
		$(".makeup_icon ._icon li").eq(2).prependTo(".makeup_icon ._icon");
		$(".makeup_icon ._icon").animate({"margin-left":"0"},1000);
	})
//鼠标点击小圆圈
	$(".makeup_icon .meinu .disk a").click(function(){
		var _index = $(this).index();
		$(".makeup_icon .meinu .disk a").css("background","#555");
		$(this).css("background","#A85F1E");
		$(".makeup_icon ._icon").animate({"margin-left":"-(_index*220)px"},1000);
	})
//时尚鞋服
	$(".apparel_icon .meinu .disk a").click(function(){
		var _index = $(this).index();
		$(".apparel_icon .meinu .disk a").css("background","#555");
		$(this).css("background","#A85F1E");
		$(".apparel_icon").animate({"margin-left":"-(_index*220)px"},1000);
	})
	//点击按钮实现轮播效果
	$(".apparel_icon .meinu a").eq(1).css("background","#A85F1E");
//点击右边按钮
	var currindex = 0;
	$(".apparel_icon .last a").click(function(){
		currindex++;
		if(currindex > 2){
			currindex = 0;
		}
		$(".apparel_icon .meinu .disk a").css("background","#555");
		$(".apparel_icon .meinu .disk a").eq(currindex).css("background","#A85F1E");
		$(".apparel_icon ._icon").stop(true).animate({"margin-left":"-220px"},1000,function(){
			$(".apparel_icon ._icon li").eq(0).appendTo(".apparel_icon ._icon");
			$(".apparel_icon ._icon").css("margin-left","0");
		});
	})
//点击左边按钮
	$(".apparel_icon .first a").click(function(){
		currindex--;
		if(currindex < 0){
			currindex = 2;
		}
		$(".apparel_icon .meinu .disk a").css("background","#555");
		$(".apparel_icon .meinu .disk a").eq(currindex).css("background","#A85F1E");
		$(".apparel_icon ._icon").css("margin-left","-220px");
		$(".apparel_icon ._icon li").eq(2).prependTo(".apparel_icon ._icon");
		$(".apparel_icon ._icon").animate({"margin-left":"0"},1000);
	})
//鼠标点击小圆圈
	$(".apparel_icon .meinu .disk a").click(function(){
		var _index = $(this).index();
		$(".apparel_icon .meinu .disk a").css("background","#555");
		$(this).css("background","#A85F1E");
		$(".apparel_icon ._icon").animate({"margin-left":"-(_index*220)px"},1000);
	})
	
});
